home *** CD-ROM | disk | FTP | other *** search
/ Master Visual Basic 3 / Master Visual Basic 3 (SAMS Publishing) (1994).ISO / mvprog / original / ch08 / selectit.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-03-28  |  2.0 KB  |  68 lines

  1. VERSION 2.00
  2. Begin Form frmSelectIt 
  3.    Caption         =   "The SelectIt Program"
  4.    ClientHeight    =   4905
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1770
  7.    ClientWidth     =   7365
  8.    Height          =   5595
  9.    Icon            =   SELECTIT.FRX:0000
  10.    Left            =   1035
  11.    LinkTopic       =   "Form1"
  12.    Picture         =   SELECTIT.FRX:0302
  13.    ScaleHeight     =   4905
  14.    ScaleWidth      =   7365
  15.    Top             =   1140
  16.    Width           =   7485
  17.    Begin CommandButton cmdExit 
  18.       Caption         =   "E&xit"
  19.       Height          =   495
  20.       Left            =   2760
  21.       TabIndex        =   0
  22.       Top             =   4320
  23.       Width           =   1215
  24.    End
  25.    Begin Menu mnuFile 
  26.       Caption         =   "&File"
  27.       Begin Menu mnuSelectFile 
  28.          Caption         =   "&Select File..."
  29.       End
  30.       Begin Menu mnuExit 
  31.          Caption         =   "E&xit"
  32.       End
  33.    End
  34. Option Explicit
  35. Sub cmdExit_Click ()
  36.     End
  37. End Sub
  38. Sub Form_Load ()
  39.     ' Load the frmGetFile form
  40.     ' but do not display it
  41.     Load frmGetFile
  42.     ' Set the items of the cboFileType combo box
  43.     ' of the frmGetFile form.
  44.     frmGetFile.cboFiletype.AddItem "All Files (*.*)"
  45.     frmGetFile.cboFiletype.AddItem "Text Files (*.txt)"
  46.     frmGetFile.cboFiletype.AddItem "Doc Files (*.doc)"
  47.     frmGetFile.cboFiletype.AddItem "BMP Files (*.bmp)"
  48.     ' Set the current (default) setting of
  49.     ' the combo box
  50.     frmGetFile.cboFiletype.ListIndex = 0
  51. End Sub
  52. Sub mnuExit_Click ()
  53.     End
  54. End Sub
  55. Sub mnuSelectFile_Click ()
  56.     ' Display the frmGetFile form
  57.     ' as a modal dialog box.
  58.     frmGetFile.Show 1
  59.     ' Display the name of the selected file
  60.     If frmGetFile.Tag = "" Then
  61.        ' No file was selected
  62.        MsgBox "No file was selected", 48
  63.     Else
  64.        ' The selected file is frmGetFile.Tag
  65.        MsgBox "File Selected: " + frmGetFile.Tag, 48
  66.     End If
  67. End Sub
  68.